G_BEGIN_DECLS
typedef enum {
- GTK_DEBUG_MISC = 1 << 0,
- GTK_DEBUG_PLUGSOCKET = 1 << 1,
- GTK_DEBUG_TEXT = 1 << 2,
- GTK_DEBUG_TREE = 1 << 3,
- GTK_DEBUG_UPDATES = 1 << 4,
- GTK_DEBUG_KEYBINDINGS = 1 << 5,
- GTK_DEBUG_MULTIHEAD = 1 << 6,
- GTK_DEBUG_MODULES = 1 << 7,
- GTK_DEBUG_GEOMETRY = 1 << 8,
- GTK_DEBUG_ICONTHEME = 1 << 9,
- GTK_DEBUG_PRINTING = 1 << 10,
- GTK_DEBUG_BUILDER = 1 << 11
+ GTK_DEBUG_MISC = 1 << 0,
+ GTK_DEBUG_PLUGSOCKET = 1 << 1,
+ GTK_DEBUG_TEXT = 1 << 2,
+ GTK_DEBUG_TREE = 1 << 3,
+ GTK_DEBUG_UPDATES = 1 << 4,
+ GTK_DEBUG_KEYBINDINGS = 1 << 5,
+ GTK_DEBUG_MULTIHEAD = 1 << 6,
+ GTK_DEBUG_MODULES = 1 << 7,
+ GTK_DEBUG_GEOMETRY = 1 << 8,
+ GTK_DEBUG_ICONTHEME = 1 << 9,
+ GTK_DEBUG_PRINTING = 1 << 10,
+ GTK_DEBUG_BUILDER = 1 << 11,
+ GTK_DEBUG_EXTENDED_LAYOUT = 1 << 12,
} GtkDebugFlag;
#ifdef G_ENABLE_DEBUG
#include "gtkintl.h"
#include "gtkalias.h"
-
-#define DEBUG_EXTENDED_LAYOUT 0
-
/* With extended layout, a widget may be requested
* its width for 2 or maximum 3 heights in one resize
*/
g_assert (cached_size->minimum_size <= cached_size->natural_size);
-#if DEBUG_EXTENDED_LAYOUT
- g_print ("[%p] %s\t%s: %d is minimum %d and natural: %d (hit cache: %s)\n",
- layout, G_OBJECT_TYPE_NAME (layout),
- orientation == GTK_SIZE_GROUP_HORIZONTAL ?
- "width for height" : "height for width" ,
- for_size,
- cached_size->minimum_size,
- cached_size->natural_size,
- found_in_cache ? "yes" : "no");
-#endif
+ GTK_NOTE (EXTENDED_LAYOUT,
+ g_print ("[%p] %s\t%s: %d is minimum %d and natural: %d (hit cache: %s)\n",
+ layout, G_OBJECT_TYPE_NAME (layout),
+ orientation == GTK_SIZE_GROUP_HORIZONTAL ?
+ "width for height" : "height for width" ,
+ for_size,
+ cached_size->minimum_size,
+ cached_size->natural_size,
+ found_in_cache ? "yes" : "no"));
}
{
gtk_extended_layout_get_desired_width (layout, &min_width, &nat_width);
gtk_extended_layout_get_height_for_width (layout, min_width, &min_height, &nat_height);
-
-#if DEBUG_EXTENDED_LAYOUT
- g_message ("%s get_desired_size min height: %d for natural width: %d",
- G_OBJECT_TYPE_NAME (layout),
- min_height, nat_width);
-#endif
-
}
else
{
gtk_extended_layout_get_desired_height (layout, &min_height, &nat_height);
gtk_extended_layout_get_width_for_height (layout, min_height, &min_width, &nat_width);
-
-#if DEBUG_EXTENDED_LAYOUT
- g_message ("%s get_desired_size min width: %d for natural height: %d",
- G_OBJECT_TYPE_NAME (layout),
- min_width, nat_height);
-#endif
}
if (minimum_size)
{"geometry", GTK_DEBUG_GEOMETRY},
{"icontheme", GTK_DEBUG_ICONTHEME},
{"printing", GTK_DEBUG_PRINTING},
- {"builder", GTK_DEBUG_BUILDER}
+ {"builder", GTK_DEBUG_BUILDER},
+ {"extended-layout", GTK_DEBUG_EXTENDED_LAYOUT},
};
#endif /* G_ENABLE_DEBUG */